ngl: Make the C half-float implementation accessible
authorMatthias Clasen <mclasen@redhat.com>
Tue, 13 Jul 2021 13:02:35 +0000 (09:02 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 13 Jul 2021 13:03:49 +0000 (09:03 -0400)
Make this accessible for tests.

gsk/ngl/fp16.c
gsk/ngl/fp16private.h

index 100d13e997195c91fb7f1c14ef97e014c38da36c..a1ff1d1af9aeda780e7dea7c6c21a8bd4e57da56 100644 (file)
@@ -54,7 +54,7 @@ float_to_half (const float x)
   return (b&0x80000000)>>16 | (e>112)*((((e-112)<<10)&0x7C00)|m>>13) | ((e<113)&(e>101))*((((0x007FF000+m)>>(125-e))+1)>>1) | (e>143)*0x7FFF; // sign : normalized : denormalized : saturate
 }
 
-static void
+void
 float_to_half4_c (const float f[4],
                   guint16     h[4])
 {
@@ -64,7 +64,7 @@ float_to_half4_c (const float f[4],
   h[3] = float_to_half (f[3]);
 }
 
-static void
+void
 half_to_float4_c (const guint16 h[4],
                   float         f[4])
 {
index a2c53d6c2d5e7e8153bdbf2a5f5d6f5d139028e1..574d7e4388f9505cae6ee7e45bf03b121833e128 100644 (file)
@@ -41,6 +41,12 @@ void float_to_half4_f16c (const float f[4],
 void half_to_float4_f16c (const guint16 h[4],
                           float         f[4]);
 
+void float_to_half4_c (const float f[4],
+                       guint16     h[4]);
+
+void half_to_float4_c (const guint16 h[4],
+                       float         f[4]);
+
 G_END_DECLS
 
 #endif